#include<bits/stdc++.h>

using namespace std;
struct Student {
    int number;
    char name[100];
    int lesson[3];
} students[5];

void input(Student &student) {
    cin >> student.number >> student.name;
    for (int i = 0; i < 3; i++) {
        cin >> student.lesson[i];
    }
}

void output(Student &student) {
    printf("%d %s %d %d %d\n", student.number, student.name,
           student.lesson[0], student.lesson[1], student.lesson[2]);
}


int main() {
    freopen("D.in", "r", stdin);
    for (int i = 0; i < 5; i++) {
        input(students[i]);
    }
    for (int i = 0; i < 5; i++) {
        output(students[i]);
    }

    return 0;
}